package com.njwb.day18.thd02;

public class MyRunnable2 implements Runnable {
    @Override
    public void run() {
        for(int i = 0 ;i<30;i++) {
            if(i%2==0){
                System.out.println(Thread.currentThread().getName()+":"+i);
                //线程的礼让
                Thread.yield();
            }
        }
    }
}
